// 全局组件注册
import GlobalMessage from './GlobalMessage.vue'
import GlobalConfirm from './GlobalConfirm.vue'
import GlobalImageViewer from './GlobalImageViewer.vue'
import GlobalVideoPlayer from './GlobalVideoPlayer.vue'
import LoadingSpinner from './LoadingSpinner.vue'
import EmptyState from './EmptyState.vue'
import ErrorBoundary from './ErrorBoundary.vue'
import BackToTop from '../common/BackToTop.vue'
import OnlineService from '../common/OnlineService.vue'
import ShortcutHelper from '../common/ShortcutHelper.vue'
import NotificationDrawer from '../common/NotificationDrawer.vue'

// 全局组件列表
const globalComponents = {
  GlobalMessage,
  GlobalConfirm,
  GlobalImageViewer,
  GlobalVideoPlayer,
  LoadingSpinner,
  EmptyState,
  ErrorBoundary,
  BackToTop,
  OnlineService,
  ShortcutHelper,
  NotificationDrawer
}

// 注册全局组件
export function setupGlobalComponents(app) {
  Object.keys(globalComponents).forEach(key => {
    app.component(key, globalComponents[key])
  })
}
